package com.code.base.i.service;

import java.util.List;
import java.util.Date;
import java.util.Map;
import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.code.base.i.persistence.IPsnFundMapper;
import com.code.base.i.pojo.IPsnFund;
import com.code.util.PrimaryKeyUtil;


@Service
public class IPsnFundService {


	@Resource
	private IPsnFundMapper iPsnFundMapper;

	public Long getInsertId() {
		return PrimaryKeyUtil.generatePrimaryKey();
	}

	public IPsnFund getDataById(Long id) {
		return iPsnFundMapper.getDataById(id);
	}

	public List<IPsnFund> getAllData() {
		return iPsnFundMapper.getAllData();
	}

	public int getDataCountByCondition(IPsnFund entity) {
		return iPsnFundMapper.getDataCountByCondition(entity);
	}

	public List<IPsnFund> getDataByCondition(IPsnFund entity) {
		return iPsnFundMapper.getDataByCondition(entity);
	}

	public int getDataCountByLikeCondition(IPsnFund entity) {
		return iPsnFundMapper.getDataCountByLikeCondition(entity);
	}

	public List<IPsnFund> getDataByLikeCondition(IPsnFund entity) {
		return iPsnFundMapper.getDataByLikeCondition(entity);
	}

	public List<IPsnFund> getDataByIds(Long[] ids) {
		return iPsnFundMapper.getDataByIds(ids);
	}

	public void insertData(IPsnFund entity) {
		insertData(entity, true);
	}

	public void insertData(IPsnFund entity, boolean setIdValue) {
		if (setIdValue) {
			entity.setId(getInsertId());
		}
		iPsnFundMapper.insertData(entity);
	}

	public void updateData(IPsnFund entity) {
		iPsnFundMapper.updateData(entity);
	}

	public void updateDataByParam(Map<String, Object> map) {
		if (map.size() == 0)
			return;

		iPsnFundMapper.updateDataByParam(map);
	}

	public void deleteDataByObject(IPsnFund entity) {
		iPsnFundMapper.deleteDataByObject(entity);
	}

	public void deleteDataById(Long id) {
		iPsnFundMapper.deleteDataById(id);
	}

	public void deleteDataByIds(Long[] ids) {
		iPsnFundMapper.deleteDataByIds(ids);
	}

}
